home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / info / xemacs.info-12 < prev    next >
Encoding:
GNU Info File  |  1995-09-01  |  49.5 KB  |  1,232 lines

  1. This is Info file ../../info/xemacs.info, produced by Makeinfo-1.63
  2. from the input file xemacs.texi.
  3.  
  4.    This file documents the XEmacs editor.
  5.  
  6.    Copyright (C) 1985, 1986, 1988 Richard M. Stallman.  Copyright (C)
  7. 1991, 1992, 1993, 1994 Lucid, Inc.  Copyright (C) 1993, 1994 Sun
  8. Microsystems, Inc.  Copyright (C) 1995 Amdahl Corporation.
  9.  
  10.    Permission is granted to make and distribute verbatim copies of this
  11. manual provided the copyright notice and this permission notice are
  12. preserved on all copies.
  13.  
  14.    Permission is granted to copy and distribute modified versions of
  15. this manual under the conditions for verbatim copying, provided also
  16. that the sections entitled "The GNU Manifesto", "Distribution" and "GNU
  17. General Public License" are included exactly as in the original, and
  18. provided that the entire resulting derived work is distributed under the
  19. terms of a permission notice identical to this one.
  20.  
  21.    Permission is granted to copy and distribute translations of this
  22. manual into another language, under the above conditions for modified
  23. versions, except that the sections entitled "The GNU Manifesto",
  24. "Distribution" and "GNU General Public License" may be included in a
  25. translation approved by the author instead of in the original English.
  26.  
  27. 
  28. File: xemacs.info,  Node: Mail Headers,  Next: Mail Mode,  Prev: Mail Format,  Up: Sending Mail
  29.  
  30. Mail Header Fields
  31. ==================
  32.  
  33.    There are several header fields you can use in the `*mail*' buffer.
  34. Each header field starts with a field name at the beginning of a line,
  35. terminated by a colon.  It does not matter whether you use upper or
  36. lower case in the field name.  After the colon and optional whitespace
  37. comes the contents of the field.
  38.  
  39. `To'
  40.      This field contains the mailing addresses of the message.
  41.  
  42. `Subject'
  43.      The contents of the `Subject' field should be a piece of text that
  44.      says what the message is about.  Subject fields are useful because
  45.      most mail-reading programs can provide a summary of messages,
  46.      listing the subject of each message but not its text.
  47.  
  48. `CC'
  49.      This field contains additional mailing addresses to send the
  50.      message to, but whose readers should not regard the message as
  51.      addressed to them.
  52.  
  53. `BCC'
  54.      This field contains additional mailing addresses to send the
  55.      message to, but which should not appear in the header of the
  56.      message actually sent.
  57.  
  58. `FCC'
  59.      This field contains the name of one file (in Unix mail file
  60.      format) to which a copy of the message should be appended when the
  61.      message is sent.
  62.  
  63. `From'
  64.      Use the `From' field to say who you are, when the account you are
  65.      using to send the mail is not your own.  The contents of the
  66.      `From' field should be a valid mailing address, since replies will
  67.      normally go there.
  68.  
  69. `Reply-To'
  70.      Use the `Reply-To' field to direct replies to a different address,
  71.      not your own. `From' and `Reply-To' have the same effect on where
  72.      replies go, but they convey a different meaning to the person who
  73.      reads the message.
  74.  
  75. `In-Reply-To'
  76.      This field contains a piece of text describing a message you are
  77.      replying to.  Some mail systems can use the information to
  78.      correlate related pieces of mail.  This field is normally filled
  79.      in by your mail handling package when you are replying to a
  80.      message and you never need to think about it.
  81.  
  82. The `To', `CC', `BCC' and `FCC' fields can appear any number of times,
  83. to specify many places to send the message.
  84.  
  85. The `To', `CC', and `BCC', fields can have continuation lines.  All the
  86. lines starting with whitespace, following the line on which the field
  87. starts, are considered part of the field.  For example,
  88.  
  89.      To: foo@here, this@there,
  90.        me@gnu.cambridge.mass.usa.earth.spiral3281
  91.  
  92. If you have a `~/.mailrc' file, Emacs scans it for mail aliases the
  93. first time you try to send mail in an Emacs session.  Emacs expands
  94. aliases found in the `To', `CC', and `BCC' fields where appropriate.
  95. You can set the variable `mail-abbrev-mailrc-file' to the name of the
  96. file with mail aliases.  If `nil', `~/.mailrc' is used.
  97.  
  98.    Your `.mailrc' file ensures that word-abbrevs are defined for each
  99. of your mail aliases when point is in a `To', `CC', `BCC', or `From'
  100. field.  The aliases are defined in your `.mailrc' file or in a file
  101. specified by the MAILRC environment variable if it exists.  Your mail
  102. aliases expand any time you type a word-delimiter at the end of an
  103. abbreviation.
  104.  
  105.    In this version of Emacs, what you see is what you get: in contrast
  106. to some other versions, no abbreviations are expanded after you have
  107. sent the mail.  This means you don't suffer the annoyance of having the
  108. system do things behind your back -- if the system rewrites an address
  109. you typed, you know it immediately, instead of after the mail has been
  110. sent and it's too late to do anything about it.  For example, you will
  111. never again be in trouble because you forgot to delete an old alias
  112. from your `.mailrc' and a new local user is given a userid which
  113. conflicts with one of your aliases.
  114.  
  115.    Your mail alias abbrevs are in effect only when point is in an
  116. appropriate header field. The mail aliases will not expand in the body
  117. of the message, or in other header fields.  The default mode-specific
  118. abbrev table `mail-mode-abbrev-table' is used instead if defined.  That
  119. means if you have been using mail-mode specific abbrevs, this code will
  120. not adversely affect you.  You can control which header fields the
  121. abbrevs are used in by changing the variable `mail-abbrev-mode-regexp'.
  122.  
  123.    If auto-fill mode is on, abbrevs wrap at commas instead of at word
  124. boundaries, and header continuation lines will be properly indented.
  125.  
  126.    You can also insert a mail alias with
  127. `mail-interactive-insert-alias'.  This function, which is bound to `C-c
  128. C-a', prompts you for an alias (with completion) and inserts its
  129. expansion at point.
  130.  
  131.    In this version of Emacs, it is possible to have lines like the
  132. following in your `.mailrc' file:
  133.  
  134.           alias someone "John Doe <doe@quux.com>"
  135.  
  136.    That is, if you want an address to have embedded spaces, simply
  137. surround it with double-quotes.  The quotes are necessary because the
  138. format of the `.mailrc' file uses spaces as address delimiters.
  139.  
  140.    Aliases in the `.mailrc' file may be nested. For example, assume you
  141. define aliases like:
  142.           alias group1 fred ethel
  143.           alias group2 larry curly moe
  144.           alias everybody group1 group2
  145.  
  146.    When you now type `everybody' on the `To' line, it will expand to:
  147.           fred, ethyl, larry, curly, moe
  148.  
  149.    Aliases may contain forward references; the alias of `everybody' in
  150. the example above can preceed the aliases of `group1' and `group2'.
  151.  
  152.    In this version of Emacs, you can use the `source' `.mailrc' command
  153. for reading aliases from some other file as well.
  154.  
  155.    Aliases may contain hyphens, as in `"alias foo-bar foo@bar"', even
  156. though word-abbrevs normally cannot contain hyphens.
  157.  
  158.    To read in the contents of another `.mailrc'-type file from Emacs,
  159. use the command `M-x merge-mail-aliases'.  The `rebuild-mail-aliases'
  160. command is similar, but deletes existing aliases first.
  161.  
  162.    If you want multiple addresses separated by a string other than `,'
  163. (a comma), then set the variable `mail-alias-seperator-string' to it.
  164. This has to be a comma bracketed by whitespace if you want any kind  of
  165. reasonable behavior.
  166.  
  167.    If the variable `mail-archive-file-name' is non-`nil', it should be
  168. a string naming a file.  Each time you start to edit a message to send,
  169. an `FCC' field is entered for that file.  Unless you remove the `FCC'
  170. field, every message is written into that file when it is sent.
  171.  
  172. 
  173. File: xemacs.info,  Node: Mail Mode,  Prev: Mail Headers,  Up: Sending Mail
  174.  
  175. Mail Mode
  176. =========
  177.  
  178.    The major mode used in the `*mail*' buffer is Mail mode.  Mail mode
  179. is similar to Text mode, but several commands are provided on the `C-c'
  180. prefix.  These commands all deal specifically with editing or sending
  181. the message.
  182.  
  183. `C-c C-s'
  184.      Send the message, and leave the `*mail*' buffer selected
  185.      (`mail-send').
  186.  
  187. `C-c C-c'
  188.      Send the message, and select some other buffer
  189.      (`mail-send-and-exit').
  190.  
  191. `C-c C-f C-t'
  192.      Move to the `To' header field, creating one if there is none
  193.      (`mail-to').
  194.  
  195. `C-c C-f C-s'
  196.      Move to the `Subject' header field, creating one if there is none
  197.      (`mail-subject').
  198.  
  199. `C-c C-f C-c'
  200.      Move to the `CC' header field, creating one if there is none
  201.      (`mail-cc').
  202.  
  203. `C-c C-w'
  204.      Insert the file `~/.signature' at the end of the message text
  205.      (`mail-signature').
  206.  
  207. `C-c C-y'
  208.      Yank the selected message (`mail-yank-original').
  209.  
  210. `C-c C-q'
  211.      Fill all paragraphs of yanked old messages, each individually
  212.      (`mail-fill-yanked-message').
  213.  
  214. `button3'
  215.      Pops up a menu of useful mail-mode commands.
  216.  
  217.    There are two ways to send a message.  `C-c C-c'
  218. (`mail-send-and-exit') is the usual way to send the message.  It sends
  219. the message and then deletes the window (if there is another window) or
  220. switches to another buffer.  It puts the `*mail*' buffer at the lowest
  221. priority for automatic reselection, since you are finished with using
  222. it.  `C-c C-s' (`mail-send') sends the message and marks the `*mail*'
  223. buffer unmodified, but leaves that buffer selected so that you can
  224. modify the message (perhaps with new recipients) and send it again.
  225.  
  226.    Mail mode provides some other special commands that are useful for
  227. editing the headers and text of the message before you send it.  There
  228. are three commands defined to move point to particular header fields,
  229. all based on the prefix `C-c C-f' (`C-f' is for "field").  They are
  230. `C-c C-f C-t' (`mail-to') to move to the `To' field, `C-c C-f C-s'
  231. (`mail-subject') for the `Subject' field, and `C-c C-f C-c' (`mail-cc')
  232. for the `CC' field.  These fields have special motion commands because
  233. they are edited most frequently.
  234.  
  235.    `C-c C-w' (`mail-signature') adds a standard piece of text at the
  236. end of the message to say more about who you are.  The text comes from
  237. the file `.signature' in your home directory.
  238.  
  239.    When you use an Rmail command to send mail from the Rmail mail
  240. reader, you can use `C-c C-y' `mail-yank-original' inside the `*mail*'
  241. buffer to insert the text of the message you are replying to.  Normally
  242. Rmail indents each line of that message four spaces and eliminates most
  243. header fields.  A numeric argument specifies the number of spaces to
  244. indent.  An argument of just `C-u' says not to indent at all and not to
  245. eliminate anything.  `C-c C-y' always uses the current message from the
  246. `RMAIL' buffer, so you can insert several old messages by selecting one
  247. in `RMAIL', switching to `*mail*' and yanking it, then switching back
  248. to `RMAIL' to select another.
  249.  
  250.    After using `C-c C-y', you can use the command `C-c C-q'
  251. (`mail-fill-yanked-message') to fill the paragraphs of the yanked old
  252. message or messages.  One use of `C-c C-q' fills all such paragraphs,
  253. each one separately.
  254.  
  255.    Clicking the right mouse button in a mail buffer pops up a menu of
  256. the above commands, for easy access.
  257.  
  258.    Turning on Mail mode (which `C-x m' does automatically) calls the
  259. value of `text-mode-hook', if it is not void or `nil', and then calls
  260. the value of `mail-mode-hook' if that is not void or `nil'.
  261.  
  262. 
  263. File: xemacs.info,  Node: Reading Mail,  Next: Calendar/Diary,  Prev: Sending Mail,  Up: Top
  264.  
  265. Reading Mail
  266. ************
  267.  
  268.    XEmacs provides three separate mail-reading packages.  Each one
  269. comes with its own manual, which is included standard with the XEmacs
  270. distribution.
  271.  
  272.    The recommended mail-reading package for new users is VM.  VM works
  273. with standard Unix-mail-format folders and was designed as a replacement
  274. for the older Rmail.
  275.  
  276.    XEmacs also provides a sophisticated and comfortable front-end to the
  277. MH mail-processing system, called `mh-e'.  Unlike in other mail
  278. programs, folders in MH are stored as file-system directories, with
  279. each message occupying one (numbered) file.  This facilitates working
  280. with mail using shell commands, and many other features of MH are also
  281. designed to integrate well with the shell and with shell scripts.  Keep
  282. in mind, however, that in order to use mh-e you must have the MH
  283. mail-processing system installed on your computer.
  284.  
  285.    Finally, XEmacs provides the Rmail package.  Rmail is (currently) the
  286. only mail reading package distributed with FSF GNU Emacs, and is
  287. powerful in its own right.  However, it stores mail folders in a special
  288. format called `Babyl', that is incompatible with all other
  289. frequently-used mail programs.  A utility program is provided for
  290. converting Babyl folders to standard Unix-mail format; however, unless
  291. you already have mail in Babyl-format folders, you should consider
  292. using VM or mh-e instead. (If at times you have to use FSF Emacs, it is
  293. not hard to obtain and install VM for that editor.)
  294.  
  295. 
  296. File: xemacs.info,  Node: Calendar/Diary,  Next: Sorting,  Prev: Reading Mail,  Up: Top
  297.  
  298. Calendar Mode and the Diary
  299. ===========================
  300.  
  301.    Emacs provides the functions of a desk calendar, with a diary of past
  302. or planned events.  Display the calendar by typing `M-x calendar'.
  303. This command creates a window containing a three-month calendar centered
  304. on the current month, with point on the current date.  Or, provide a
  305. prefix argument by typing `C-u M-x calendar'; then you are prompted for
  306. the month and year to be the center of the three-month calendar.  In
  307. either case, you are now in Calendar mode.
  308.  
  309.    Calendar mode makes it easy to look at the holidays or diary entries
  310. associated with various dates, and to change the diary entries.  You
  311. can move freely between the Calendar window and other windows.  To exit
  312. the calendar, type `q'.
  313.  
  314. * Menu:
  315.  
  316. * Calendar Motion::        Moving through the calendar; selecting a date.
  317. * Scroll Calendar::        Bringing earlier or later months onto the screen.
  318. * Mark and Region::        Remembering dates, the mark ring.
  319. * General Calendar::       Conveniences for moving about.
  320. * Holidays::               Displaying dates of holidays.
  321. * Sunrise/Sunset::         Displaying local times of sunrise and sunset.
  322. * Lunar Phases::           Displaying phases of the moon.
  323. * Other Calendars::        Converting dates to other calendar systems.
  324. * Diary::                  Displaying events from your diary.
  325. * Calendar Customization:: Altering the behavior of the features above.
  326.  
  327. 
  328. File: xemacs.info,  Node: Calendar Motion,  Next: Scroll Calendar,  Prev: Calendar/Diary,  Up: Calendar/Diary
  329.  
  330. Movement in the Calendar
  331. ------------------------
  332.  
  333.    Calendar mode lets you move in logical units of time such as days,
  334. weeks, months, and years.  Sometimes you need to move to a specific date
  335. in order to enter commands affecting its display or the associated diary
  336. entries.  If you move outside the three months originally displayed, the
  337. calendar display scrolls automatically through time.
  338.  
  339. * Menu:
  340.  
  341. * Calendar Unit Motion::       Moving by days, weeks, months, and years.
  342. * Move to Beginning or End::   Moving to start/end of weeks, months, and years.
  343. * Specified Dates::            Moving to the current date or another specific date.
  344.  
  345. 
  346. File: xemacs.info,  Node: Calendar Unit Motion,  Next: Move to Beginning or End,  Prev: Calendar Motion,  Up: Calendar Motion
  347.  
  348. Motion by Integral Days, Weeks, Months, Years
  349. .............................................
  350.  
  351.    The commands for movement in the calendar buffer parallel the
  352. commands for movement in text.  You can move forward and backward by
  353. days, weeks, months, and years.
  354.  
  355. `C-f'
  356.      Move point one day forward (`calendar-forward-day').
  357.  
  358. `C-b'
  359.      Move point one day backward (`calendar-backward-day').
  360.  
  361. `C-n'
  362.      Move point one week forward (`calendar-forward-week').
  363.  
  364. `C-p'
  365.      Move point one week backward (`calendar-backward-week').
  366.  
  367. `M-}'
  368.      Move point one month forward (`calendar-forward-month').
  369.  
  370. `M-{'
  371.      Move point one month backward (`calendar-backward-month').
  372.  
  373. `C-x ]'
  374.      Move point one year forward (`calendar-forward-year').
  375.  
  376. `C-x ['
  377.      Move point one year backward (`calendar-forward-year').
  378.  
  379.    The day and week commands are natural analogues of the usual Emacs
  380. commands for moving by characters and by lines.  Just as `C-n' usually
  381. moves to the same column in the following line, in Calendar mode it
  382. moves to the same day in the following week.  And `C-p' moves to the
  383. same day in the previous week.
  384.  
  385.    The commands for motion by months and years work like those for
  386. weeks, but move a larger distance.  The month commands `M-}' and `M-{'
  387. move forward or backward by an entire month's time.  The year commands
  388. `C-x ]' and `C-x [' move forward or backward a whole year.
  389.  
  390.    The easiest way to remember these commands is to consider months and
  391. years analogous to paragraphs and pages of text, respectively.  But the
  392. commands themselves are not quite analogous.  The ordinary Emacs
  393. paragraph commands move to the beginning or end of a paragraph, whereas
  394. these month and year commands move by an entire month or an entire
  395. year, which usually involves skipping across the end of a month or year.
  396.  
  397.    Each of these commands accepts a numeric argument as a repeat count.
  398. For convenience, the digit keys and the minus sign are bound in
  399. Calendar mode so that it is unnecessary to type the `M-' prefix.  For
  400. example, `100 C-f' moves point 100 days forward from its present
  401. location.
  402.  
  403. 
  404. File: xemacs.info,  Node: Move to Beginning or End,  Next: Specified Dates,  Prev: Calendar Unit Motion,  Up: Calendar Motion
  405.  
  406. Beginning or End of Week, Month or Year
  407. .......................................
  408.  
  409.    A week (or month, or year) is not just a quantity of days; we think
  410. of new weeks (months, years) as starting on particular days.  So
  411. Calendar mode provides commands to move to the beginning or end of the
  412. week, month or year:
  413.  
  414. `C-a'
  415.      Move point to beginning of week (`calendar-beginning-of-week').
  416.  
  417. `C-e'
  418.      Move point to end of week (`calendar-end-of-week').
  419.  
  420. `M-a'
  421.      Move point to beginning of month (`calendar-beginning-of-month').
  422.  
  423. `M-e'
  424.      Move point to end of month (`calendar-end-of-month').
  425.  
  426. `M-<'
  427.      Move point to beginning of year (`calendar-beginning-of-year').
  428.  
  429. `M->'
  430.      Move point to end of year (`calendar-end-of-year').
  431.  
  432.    These commands also take numeric arguments as repeat counts, with the
  433. repeat count indicating how many weeks, months, or years to move
  434. backward or forward.
  435.  
  436. 
  437. File: xemacs.info,  Node: Specified Dates,  Prev: Move to Beginning or End,  Up: Calendar Motion
  438.  
  439. Particular Dates
  440. ................
  441.  
  442.    Calendar mode provides some commands for getting to a particular date
  443. quickly.
  444.  
  445. `g d'
  446.      Move point to specified date (`calendar-goto-date').
  447.  
  448. `o'
  449.      Center calendar around specified month (`calendar-other-month').
  450.  
  451. `.'
  452.      Move point to today's date (`calendar-current-month').
  453.  
  454.    `g d' (`calendar-goto-date') prompts for a year, a month, and a day
  455. of the month, and then goes to that date.  Because the calendar
  456. includes all dates from the beginning of the current era, you must type
  457. the year in its entirety; that is, type `1990', not `90'.
  458.  
  459.    `o' (`calendar-other-month') prompts for a month and year, then
  460. centers the three-month calendar around that month.
  461.  
  462.    You can return to the current date with `.'
  463. (`calendar-current-month').
  464.  
  465. 
  466. File: xemacs.info,  Node: Scroll Calendar,  Next: Mark and Region,  Prev: Calendar Motion,  Up: Calendar/Diary
  467.  
  468. Scrolling the Calendar through Time
  469. -----------------------------------
  470.  
  471.    The calendar display scrolls automatically through time when you
  472. move out of the visible portion.  You can also scroll it manually.
  473. Imagine that the calendar window contains a long strip of paper with
  474. the months on it.  Scrolling it means moving the strip so that new
  475. months become visible in the window.
  476.  
  477. `C-x <'
  478.      Scroll calendar one month forward (`scroll-calendar-left').
  479.  
  480. `C-x >'
  481.      Scroll calendar one month backward (`scroll-calendar-right').
  482.  
  483. `C-v'
  484.      Scroll calendar three months forward
  485.      (`scroll-calendar-left-three-months').
  486.  
  487. `M-v'
  488.      Scroll calendar three months backward
  489.      (`scroll-calendar-right-three-months').
  490.  
  491.    The most basic calendar scroll commands scroll by one month at a
  492. time.  This means that there are two months of overlap between the
  493. display before the command and the display after.  `C-x <' scrolls the
  494. calendar contents one month to the left; that is, it moves the display
  495. forward in time.  `C-x >' scrolls the contents to the right, which
  496. moves backwards in time.
  497.  
  498.    The commands `C-v' and `M-v' scroll the calendar by an entire
  499. "screenful"--three months--in analogy with the usual meaning of these
  500. commands.  `C-v' makes later dates visible and `M-v' makes earlier
  501. dates visible.  These commands also take a numeric argument as a repeat
  502. count; in particular, since `C-u' (`universal-argument') multiplies the
  503. next command by four, typing `C-u C-v' scrolls the calendar forward by
  504. a year and typing `C-u M-v' scrolls the calendar backward by a year.
  505.  
  506.    Any of the special Calendar mode commands scrolls the calendar
  507. automatically as necessary to ensure that the date you have moved to is
  508. visible.
  509.  
  510. 
  511. File: xemacs.info,  Node: Mark and Region,  Next: General Calendar,  Prev: Scroll Calendar,  Up: Calendar/Diary
  512.  
  513. The Mark and the Region
  514. -----------------------
  515.  
  516.    The concept of the mark applies to the calendar just as to any other
  517. buffer, but it marks a *date*, not a *position* in the buffer.  The
  518. region consists of the days between the mark and point (including the
  519. starting and stopping dates).
  520.  
  521. `C-SPC'
  522.      Set the mark to today's date (`calendar-set-mark').
  523.  
  524. `C-@'
  525.      The same.
  526.  
  527. `C-x C-x'
  528.      Interchange mark and point (`calendar-exchange-point-and-mark').
  529.  
  530. `M-='
  531.      Display the number of days in the current region
  532.      (`calendar-count-days-region').
  533.  
  534.    You set the mark in the calendar, as in any other buffer, by using
  535. `C-@' or `C-SPC' (`calendar-set-mark').  You return to the marked date
  536. with the command `C-x C-x' (`calendar-exchange-point-and-mark') which
  537. puts the mark where point was and point where mark was.  The calendar
  538. is scrolled as necessary, if the marked date was not visible on the
  539. screen.  This does not change the extent of the region.
  540.  
  541.    To determine the number of days in the region, type `M-='
  542. (`calendar-count-days-region').  The numbers of days printed is
  543. *inclusive*, that is, includes the days specified by mark and point.
  544.  
  545.    The main use of the mark in the calendar is to remember dates that
  546. you may want to go back to.  To make this feature more useful, the mark
  547. ring (*note Mark Ring::.) operates exactly as in other buffers:  Emacs
  548. remembers 16 previous locations of the mark.  To return to a marked
  549. date, type `C-u C-SPC' (or `C-u C-@'); this is the command
  550. `calendar-set-mark' given a numeric argument.  It moves point to where
  551. the mark was, restores the mark from the ring of former marks, and
  552. stores the previous point at the end of the mark ring.  So, repeated
  553. use of this command moves point through all the old marks on the ring,
  554. one by one.
  555.  
  556. 
  557. File: xemacs.info,  Node: General Calendar,  Next: Holidays,  Prev: Mark and Region,  Up: Calendar/Diary
  558.  
  559. Miscellaneous Calendar Commands
  560. -------------------------------
  561.  
  562. `p d'
  563.      Display day-in-year (`calendar-print-day-of-year').
  564.  
  565. `?'
  566.      Briefly describe calendar commands (`describe-calendar-mode').
  567.  
  568. `SPC'
  569.      Scroll the next window (`scroll-other-window').
  570.  
  571. `C-c C-l'
  572.      Regenerate the calendar window (`redraw-calendar').
  573.  
  574. `q'
  575.      Exit from calendar (`exit-calendar').
  576.  
  577.    If you want to know how many days have elapsed since the start of
  578. the year, or the number of days remaining in the year, type the `p d'
  579. command (`calendar-print-day-of-year').  This displays both of those
  580. numbers in the echo area.
  581.  
  582.    To display a brief description of the calendar commands, type `?'
  583. (`describe-calendar-mode').  For a fuller description, type `C-h m'.
  584.  
  585.    You can use `SPC' (`scroll-other-window') to scroll the other
  586. window.  This is handy when you display a list of holidays or diary
  587. entries in another window.
  588.  
  589.    If the calendar window gets corrupted, type `C-c C-l'
  590. (`redraw-calendar') to redraw it.
  591.  
  592.    To exit from the calendar, type `q' (`exit-calendar').  This buries
  593. all buffers related to the calendar and returns the window display to
  594. what it was when you entered the calendar.
  595.  
  596. 
  597. File: xemacs.info,  Node: Holidays,  Next: Sunrise/Sunset,  Prev: General Calendar,  Up: Calendar/Diary
  598.  
  599. Holidays
  600. --------
  601.  
  602.    The Emacs calendar knows about all major and many minor holidays.
  603.  
  604. `h'
  605.      Display holidays for the date indicated by point
  606.      (`calendar-cursor-holidays').
  607.  
  608. `x'
  609.      Mark holidays in the calendar window (`mark-calendar-holidays').
  610.  
  611. `u'
  612.      Unmark calendar window (`calendar-unmark').
  613.  
  614. `a'
  615.      List all holidays for the displayed three months in another window
  616.      (`list-calendar-holidays').
  617.  
  618. `M-x holidays'
  619.      List all holidays for three months around today's date in another
  620.      window.
  621.  
  622.    To see if any holidays fall on a given date, position point on that
  623. date in the calendar window and use the `h' command.  The holidays are
  624. usually listed in the echo area, but if there are too many to fit in
  625. one line, then they are displayed in a separate window.
  626.  
  627.    To find the distribution of holidays for a wider period, you can use
  628. the `x' command.  This places a `*' next to every date on which a
  629. holiday falls.  The command applies both to the currently visible dates
  630. and to new dates that become visible by scrolling.  To turn marking off
  631. and erase the current marks, type `u', which also erases any diary
  632. marks (*note Diary::.).
  633.  
  634.    To get even more detailed information, use the `a' command, which
  635. displays a separate buffer containing a list of all holidays in the
  636. current three-month range.
  637.  
  638.    You can display the list of holidays for the current month and the
  639. preceding and succeeding months even if you don't have a calendar
  640. window.  Use the command `M-x holidays'.  If you want the list of
  641. holidays centered around a different month, use `C-u M-x holidays' and
  642. type the month and year.
  643.  
  644.    The holidays known to Emacs include American holidays and the major
  645. Christian, Jewish, and Islamic holidays; when floating point is
  646. available, Emacs also knows about solstices and equinoxes.  The dates
  647. used by Emacs for holidays are based on *current practice*, not
  648. historical fact.  Historically, for instance, the start of daylight
  649. savings time and even its existence have varied from year to year.
  650. However present American law mandates that daylight savings time begins
  651. on the first Sunday in April; this is the definition that Emacs uses,
  652. even though it is wrong for some prior years.
  653.  
  654. 
  655. File: xemacs.info,  Node: Sunrise/Sunset,  Next: Lunar Phases,  Prev: Holidays,  Up: Calendar/Diary
  656.  
  657. Times of Sunrise and Sunset
  658. ---------------------------
  659.  
  660.    Emacs can tell you, to within a minute or two, the times of sunrise
  661. and sunset for any date, if floating point is available.
  662.  
  663. `S'
  664.      Display times of sunrise and sunset for the date indicated by point
  665.      (`calendar-sunrise-sunset').
  666.  
  667. `M-x sunrise-sunset'
  668.      Display times of sunrise and sunset for today's date.
  669.  
  670.    Move point to the date you want, and type `S', to display the *local
  671. times* of sunrise and sunset in the echo area.
  672.  
  673.    You can display the times of sunrise and sunset for the current date
  674. even if you don't have a calendar window.  Use the command `M-x
  675. sunrise-sunset'.  If you want the times of sunrise and sunset for a
  676. different date, use `C-u M-x sunrise-sunset' and type the year, month,
  677. and day.
  678.  
  679.    Because the times of sunrise and sunset depend on the location on
  680. earth, you need to tell Emacs your latitude, longitude, and location
  681. name.  Here is an example of what to set:
  682.  
  683.      (setq calendar-latitude 40.1)
  684.      (setq calendar-longitude -88.2)
  685.      (setq calendar-location-name "Urbana, IL")
  686.  
  687. Use one decimal place in the values of `calendar-latitude' and
  688. `calendar-longitude'.
  689.  
  690.    Your time zone also affects the local time of sunrise and sunset.
  691. Emacs usually gets this information from the operating system, but if
  692. these values are not what you want (or if the operating system does not
  693. supply them), you'll need to set them yourself, like this:
  694.  
  695.      (setq calendar-time-zone -360)
  696.      (setq calendar-standard-time-zone-name "CST")
  697.      (setq calendar-daylight-time-zone-name "CDT")
  698.  
  699. The value of `calendar-time-zone' is the number of minutes difference
  700. between your local standard time and Universal Time (Greenwich time).
  701. The values of `calendar-standard-time-zone-name' and
  702. `calendar-daylight-time-zone-name' are the abbreviations used in your
  703. time zone.
  704.  
  705.    Emacs displays the times of sunrise and sunset *corrected for
  706. daylight savings time* (this convenience is unusual; most tables of
  707. sunrise and sunset use standard time).  The default rule for the
  708. starting and stopping dates of daylight savings time is the American
  709. rule.  *Note Daylight Savings::
  710.  
  711.    You can display the times of sunrise and sunset for any location and
  712. any date with `C-u C-u M-x sunrise-sunset'.  Emacs asks you for a
  713. longitude, latitude, number of minutes difference from Universal time,
  714. and date, and then tells you the times of sunrise and sunset for that
  715. location on that date.  The times are usually given in the echo area,
  716. but if the message is too long fit in one line, they are displayed in a
  717. separate window.
  718.  
  719. 
  720. File: xemacs.info,  Node: Lunar Phases,  Next: Other Calendars,  Prev: Sunrise/Sunset,  Up: Calendar/Diary
  721.  
  722. Phases of the Moon
  723. ------------------
  724.  
  725.    Emacs can tell you the dates and times of the phases of the moon (new
  726. moon, first quarter, full moon, last quarter), if floating point is
  727. available.
  728.  
  729. `M'
  730.      List, in another window, the dates and times for all the quarters
  731.      of the moon for the three-month period shown in the calendar window
  732.      (`calendar-phases-of-moon').
  733.  
  734. `M-x phases-of-moon'
  735.      List dates and times of the quarters of the moon for three months
  736.      around today's date in another window.
  737.  
  738.    Use the `M' command to display a separate buffer of the phases of
  739. the moon for the current three-month range.  The dates and times listed
  740. are accurate to within a few minutes.
  741.  
  742.    You can display the list of the phases of the moon for the current
  743. month and the preceding and succeeding months even if you don't have a
  744. calendar window.  Use the command `M-x phases-of-moon'.  If you want
  745. the phases of the moon centered around a different month, use `C-u M-x
  746. phases-of-moon' and type the month and year.
  747.  
  748.    The dates and times given for the phases of the moon are given in
  749. local time (corrected for daylight savings, when appropriate); but if
  750. the variable `calendar-time-zone' is void, Universal Time (the
  751. Greenwich time zone) is used.  *Note Daylight Savings::
  752.  
  753. 
  754. File: xemacs.info,  Node: Other Calendars,  Next: Diary,  Prev: Lunar Phases,  Up: Calendar/Diary
  755.  
  756. Our Calendar and Other Calendars
  757. --------------------------------
  758.  
  759.    The Emacs calendar displayed is *always* the Gregorian calendar,
  760. sometimes called the "new style" calendar, which is used in most of the
  761. world today.  However, this calendar did not exist before the sixteenth
  762. century and was not widely used before the eighteenth century; it did
  763. not fully displace the Julian calendar and gain universal acceptance
  764. until the early twentieth century.  This poses a problem for the Emacs
  765. calendar: you can ask for the calendar of any month starting with
  766. January, year 1 of the current era, but the calendar displayed is the
  767. Gregorian, even for a date at which the Gregorian calendar did not
  768. exist!
  769.  
  770.    Emacs knows about several different calendars, though, not just the
  771. Gregorian calendar.  The following commands describe the date indicated
  772. by point in various calendar notations:
  773.  
  774. `p c'
  775.      Display ISO commercial calendar equivalent for selected day
  776.      (`calendar-print-iso-date').
  777.  
  778. `p j'
  779.      Display Julian date for selected day
  780.      (`calendar-print-julian-date').
  781.  
  782. `p a'
  783.      Display astronomical (Julian) day number for selected day
  784.      (`calendar-print-astro-day-number').
  785.  
  786. `p h'
  787.      Display Hebrew date for selected day
  788.      (`calendar-print-hebrew-date').
  789.  
  790. `p i'
  791.      Display Islamic date for selected day
  792.      (`calendar-print-islamic-date').
  793.  
  794. `p f'
  795.      Display French Revolutionary date for selected day
  796.      (`calendar-print-french-date').
  797.  
  798. `p m'
  799.      Display Mayan date for selected day (`calendar-print-mayan-date').
  800.  
  801.    If you are interested in these calendars, you can convert dates one
  802. at a time.  Put point on the desired date of the Gregorian calendar and
  803. press the appropriate keys.  The `p' is a mnemonic for "print" since
  804. Emacs "prints' the equivalent date in the echo area.
  805.  
  806.    The ISO commercial calendar is used largely in Europe.
  807.  
  808.    The Julian calendar, named after Julius Caesar, was the one used in
  809. Europe throughout medieval times, and in many countries up until the
  810. nineteenth century.
  811.  
  812.    Astronomers use a simple counting of days elapsed since noon, Monday,
  813. January 1, 4713 B.C. on the Julian calendar.  The number of days elapsed
  814. is called the *Julian day number* or the *Astronomical day number*.
  815.  
  816.    The Hebrew calendar is the one used to determine the dates of Jewish
  817. holidays.  Hebrew calendar dates begin and end at sunset.
  818.  
  819.    The Islamic (Moslem) calendar is the one used to determine the dates
  820. of Moslem holidays.  There is no universal agreement in the Islamic
  821. world about the calendar; Emacs uses a widely accepted version, but the
  822. precise dates of Islamic holidays often depend on proclamation by
  823. religious authorities, not on calculations.  As a consequence, the
  824. actual dates of occurrence can vary slightly from the dates computed by
  825. Emacs.  Islamic calendar dates begin and end at sunset.
  826.  
  827.    The French Revolutionary calendar was created by the Jacobins after
  828. the 1789 revolution, to represent a more secular and nature-based view
  829. of the annual cycle, and to install a 10-day week in a rationalization
  830. measure similar to the metric system.  The French government officially
  831. abandoned this calendar at the end of 1805.
  832.  
  833.    The Maya of Central America used three separate, overlapping calendar
  834. systems, the *long count*, the *tzolkin*, and the *haab*.  Emacs knows
  835. about all three of these calendars.  Experts dispute the exact
  836. correlation between the Mayan calendar and our calendar; Emacs uses the
  837. Goodman-Martinez-Thompson correlation in its calculations.
  838.  
  839.    You can move to dates that you specify on the Commercial, Julian,
  840. astronomical, Hebrew, Islamic, or French calendars:
  841.  
  842. `g c'
  843.      Move point to a date specified by the ISO commercial calendar
  844.      (`calendar-goto-iso-date').
  845.  
  846. `g j'
  847.      Move point to a date specified by the Julian calendar
  848.      (`calendar-goto-julian-date').
  849.  
  850. `g a'
  851.      Move point to a date specified by astronomical (Julian) day number
  852.      (`calendar-goto-astro-day-number').
  853.  
  854. `g h'
  855.      Move point to a date specified by the Hebrew calendar
  856.      (`calendar-goto-hebrew-date').
  857.  
  858. `g i'
  859.      Move point to a date specified by the Islamic calendar
  860.      (`calendar-goto-islamic-date').
  861.  
  862. `g f'
  863.      Move point to a date specified by the French Revolutionary calendar
  864.      (`calendar-goto-french-date').
  865.  
  866.    These commands ask you for a date on the other calendar, move point
  867. to the Gregorian calendar date equivalent to that date, and display the
  868. other calendar's date in the echo area.  Emacs uses strict completion
  869. (*note Completion::.) whenever it asks you to type a month name, so you
  870. don't have to worry about the spelling of Hebrew, Islamic, or French
  871. names.
  872.  
  873.    One common question concerning the Hebrew calendar is the computation
  874. of the anniversary of a date of death, called a "yahrzeit."  The Emacs
  875. calendar includes a facility for such calculations.  If you are in the
  876. calendar, the command `M-x list-yahrzeit-dates' asks you for a range of
  877. years and then displays a list of the yahrzeit dates for those years
  878. for the date given by point.  If you are not in the calendar, this
  879. command first asks you for the date of death and the range of years,
  880. and then displays the list of yahrzeit dates.
  881.  
  882.    Emacs also has many commands for movement on the Mayan calendars.
  883.  
  884. `g m l'
  885.      Move point to a date specified by the Mayan long count calendar
  886.      (`calendar-goto-mayan-long-count-date').
  887.  
  888. `g m p t'
  889.      Move point to the previous occurrence of a date specified by the
  890.      Mayan tzolkin calendar (`calendar-previous-tzolkin-date').
  891.  
  892. `g m n t'
  893.      Move point to the next occurrence of a date specified by the Mayan
  894.      tzolkin calendar (`calendar-next-tzolkin-date').
  895.  
  896. `g m p h'
  897.      Move point to the previous occurrence of a date specified by the
  898.      Mayan haab calendar (`calendar-previous-haab-date').
  899.  
  900. `g m n h'
  901.      Move point to the next occurrence of a date specified by the Mayan
  902.      haab calendar (`calendar-next-haab-date').
  903.  
  904. `g m p c'
  905.      Move point to the previous occurrence of a date specified by the
  906.      Mayan calendar round (`calendar-previous-calendar-round-date').
  907.  
  908. `g m n c'
  909.      Move point to the next occurrence of a date specified by the Mayan
  910.      calendar round (`calendar-next-calendar-round-date').
  911.  
  912.    To understand these commands, you need to understand the Mayan
  913. calendars.  The long count is a counting of days with units
  914.  
  915. 1 kin
  916.      = 1  day
  917.  
  918. 1 uinal
  919.      = 20 kin
  920.  
  921. 1 tun
  922.      = 18 uinal
  923.  
  924. 1 katun
  925.      = 20 tun
  926.  
  927. 1 baktun
  928.      = 20 katun
  929.  
  930. Thus, the long count date 12.16.11.16.6 means 12 baktun, 16 katun, 11
  931. tun, 16 uinal, and 6 kin.  The Emacs calendar can handle Mayan long
  932. count dates as early as 7.17.18.13.1, but no earlier.  When you use the
  933. `g m l' command, type the Mayan long count date with the baktun, katun,
  934. tun, uinal, and kin separated by periods.
  935.  
  936.    The Mayan tzolkin calendar is a cycle of 260 days formed by a pair of
  937. independent cycles of 13 and 20 days.  Like the haab cycle, this cycle
  938. repeats endlessly, and you can go backward and forward to the previous
  939. or next (respectively) point in the cycle.  When you type `g m p t',
  940. Emacs asks you for a tzolkin date and moves point to the previous
  941. occurrence of that date; type `g m n t' to go to the next occurrence.
  942.  
  943.    The Mayan haab calendar is a cycle of 365 days arranged as 18 months
  944. of 20 days each, followed a 5-day monthless period.  Since this cycle
  945. repeats endlessly, Emacs lets you go backward and forward to the
  946. previous or next (respectively) point in the cycle.  Type `g m p h' to
  947. go to the previous haab date; Emacs asks you for a haab date and moves
  948. point to the previous occurrence of that date.  Similarly, type `g m n
  949. h' to go to the next haab date.
  950.  
  951.    The Maya also used the combination of the tzolkin date and the haab
  952. date.  This combination is a cycle of about 52 years called a *calendar
  953. round*.  If you type `g m p c', Emacs asks you for both a haab and a
  954. tzolkin date and then moves point to the previous occurrence of that
  955. combination.  Use `g m p c' to move point to the next occurrence.
  956. Emacs signals an error if the haab/tzolkin date you have typed cannot
  957. occur.
  958.  
  959.    Emacs uses strict completion (*note Completion::.) whenever it asks
  960. you to type a Mayan name, so you don't have to worry about spelling.
  961.  
  962. 
  963. File: xemacs.info,  Node: Diary,  Next: Calendar Customization,  Prev: Other Calendars,  Up: Calendar/Diary
  964.  
  965. The Diary
  966. ---------
  967.  
  968.    Associated with the Emacs calendar is a diary that keeps track of
  969. appointments or other events on a daily basis.  To use the diary
  970. feature, you must first create a "diary file" containing a list of
  971. events and their dates.  Then Emacs can automatically pick out and
  972. display the events for today, for the immediate future, or for any
  973. specified date.
  974.  
  975.    By default, Emacs expects your diary file to be named `~/diary'.  It
  976. uses the same format as the `calendar' utility.  A sample `~/diary'
  977. file is:
  978.  
  979.      12/22/1988 Twentieth wedding anniversary!!
  980.      &1/1. Happy New Year!
  981.      10/22 Ruth's birthday.
  982.      * 21, *: Payday
  983.      Tuesday--weekly meeting with grad students at 10am
  984.               Supowit, Shen, Bitner, and Kapoor to attend.
  985.      1/13/89 Friday the thirteenth!!
  986.      &thu 4pm squash game with Lloyd.
  987.      mar 16 Dad's birthday
  988.      April 15, 1989 Income tax due.
  989.      &* 15 time cards due.
  990.  
  991.    Although you probably will start by creating a diary manually, Emacs
  992. provides a number of commands to let you view, add, and change diary
  993. entries.  You can also share diary entries with other users (*note
  994. Included Diary Files::.).
  995.  
  996. * Menu:
  997.  
  998. * Diary Commands::         Viewing diary entries and associated calendar dates.
  999. * Format of Diary File::   Entering events in your diary.
  1000. * Special Diary Entries::  Anniversaries, blocks of dates, cyclic entries, etc.
  1001.  
  1002. 
  1003. File: xemacs.info,  Node: Diary Commands,  Next: Format of Diary File,  Prev: Diary,  Up: Diary
  1004.  
  1005. Commands Displaying Diary Entries
  1006. ---------------------------------
  1007.  
  1008.    Once you have created a `~/diary' file, you can view it within
  1009. Calendar mode.  You can also view today's events independently of
  1010. Calendar mode.
  1011.  
  1012. `d'
  1013.      Display any diary entries for the selected date
  1014.      (`view-diary-entries').
  1015.  
  1016. `s'
  1017.      Display entire diary file (`show-all-diary-entries').
  1018.  
  1019. `m'
  1020.      Mark all visible dates that have diary entries
  1021.      (`mark-diary-entries').
  1022.  
  1023. `u'
  1024.      Unmark calendar window (`calendar-unmark').
  1025.  
  1026. `M-x print-diary-entries'
  1027.      Print a hard copy of the diary display as it appears.
  1028.  
  1029. `M-x diary'
  1030.      Display any diary entries for today's date.
  1031.  
  1032.    Displaying the diary entries with `d' shows in a separate window the
  1033. diary entries for the date indicated by point in the calendar window.
  1034. The mode line of the new window shows the date of the diary entries and
  1035. any holidays that fall on that date.
  1036.  
  1037.    If you specify a numeric argument with `d', then all the diary
  1038. entries for that many successive days are shown.  Thus, `2 d' displays
  1039. all the entries for the selected date and for the following day.
  1040.  
  1041.    To get a broader overview of which days are mentioned in the diary,
  1042. use the `m' command to mark those days in the calendar window.  The
  1043. marks appear next to the dates to which they apply.  The `m' command
  1044. affects the dates currently visible and, if you scroll the calendar,
  1045. newly visible dates as well.  The `u' command deletes all diary marks
  1046. (and all holiday marks too; *note Holidays::.), not only in the dates
  1047. currently visible, but dates that become visible when you scroll the
  1048. calendar.
  1049.  
  1050.    For more detailed information, use the `s' command, which displays
  1051. the entire diary file.
  1052.  
  1053.    Display of selected diary entries uses the selective display feature,
  1054. the same feature that Outline mode uses to show part of an outline
  1055. (*note Outline Mode::.).  This involves hiding the diary entries that
  1056. are not relevant, by changing the preceding newline into an ASCII
  1057. control-m (code 015).  The hidden lines are part of the buffer's text,
  1058. but they are invisible; they don't appear on the screen.  When you save
  1059. the diary file, the control-m characters are saved as newlines; thus,
  1060. the invisible lines become ordinary lines in the file.
  1061.  
  1062.    Because the diary buffer as you see it is an illusion, simply
  1063. printing the contents does not print what you see on your screen.  So
  1064. there is a special command to print a hard copy of the buffer *as it
  1065. appears*; this command is `M-x print-diary-entries'.  It sends the data
  1066. directly to the printer.  You can customize it like `lpr-region' (*note
  1067. Hardcopy::.).
  1068.  
  1069.    The command `M-x diary' displays the diary entries for the current
  1070. date, independently of the calendar display, and optionally for the next
  1071. few days as well; the variable `number-of-diary-entries' specifies how
  1072. many days to include (*note Customization::.).
  1073.  
  1074.    If you put in your `.emacs' file:
  1075.  
  1076.      (diary)
  1077.  
  1078. it automatically displays a window with the day's diary entries, when
  1079. you enter Emacs.  The mode line of the displayed window shows the date
  1080. and any holidays that fall on that date.
  1081.  
  1082. 
  1083. File: xemacs.info,  Node: Format of Diary File,  Next: Special Diary Entries,  Prev: Diary Commands,  Up: Diary
  1084.  
  1085. The Diary File
  1086. --------------
  1087.  
  1088.    Your "diary file" is a file that records events associated with
  1089. particular dates.  The name of the diary file is specified by the
  1090. variable `diary-file'; `~/diary' is the default.  You can use the same
  1091. file for the `calendar' utility program, since its formats are a subset
  1092. of the ones allowed by the Emacs Calendar.
  1093.  
  1094.    Each entry in the file describes one event and consists of one or
  1095. more lines.  It always begins with a date specification at the left
  1096. margin.  The rest of the entry is simply text to describe the event.
  1097. If the entry has more than one line, then the lines after the first
  1098. must begin with whitespace to indicate they continue a previous entry.
  1099.  
  1100.    Here are some sample diary entries, illustrating different ways of
  1101. formatting a date.  The examples all show dates in American order
  1102. (month, day, year), but Calendar mode offers (day, month, year)
  1103. ordering too.
  1104.  
  1105.      4/20/93  Switch-over to new tabulation system
  1106.      apr. 25  Start tabulating annual results
  1107.      4/30  Results for April are due
  1108.      */25  Monthly cycle finishes
  1109.      Friday  Don't leave without backing up files
  1110.  
  1111.    The first entry appears only once, on April 20, 1993.  The second and
  1112. third appear every year on the specified dates, and the fourth uses a
  1113. wildcard (asterisk) for the month, so it appears on the 25th of every
  1114. month.  The final entry appears every week on Friday.
  1115.  
  1116.    You can also use just numbers to express a date, as in `MONTH/DAY' or
  1117. `MONTH/DAY/YEAR'.  This must be followed by a nondigit.  In the date
  1118. itself, MONTH and DAY are numbers of one or two digits.  YEAR is a
  1119. number and may be abbreviated to the last two digits; that is, you can
  1120. use `11/12/1989' or `11/12/89'.
  1121.  
  1122.    A date may be "generic", or partially unspecified.  Then the entry
  1123. applies to all dates that match the specification.  If the date does
  1124. not contain a year, it is generic and applies to any year.
  1125. Alternatively, MONTH, DAY, or YEAR can be a `*'; this matches any
  1126. month, day, or year, respectively.  Thus, a diary entry `3/*/*' matches
  1127. any day in March of any year.
  1128.  
  1129.    Dates can also have the form `MONTHNAME DAY' or `MONTHNAME DAY,
  1130. YEAR', where the month's name can be spelled in full or abbreviated to
  1131. three characters (with or without a period).  Case is not significant.
  1132. If the date does not contain a year, it is generic and applies to any
  1133. year.  Also, MONTHNAME, DAY, or YEAR can be a `*' which matches any
  1134. month, day, or year, respectively.
  1135.  
  1136.    If you prefer the European style of writing dates--in which the day
  1137. comes before the month--type `M-x european-calendar' while in the
  1138. calendar, or set the variable `european-calendar-style' to `t' in your
  1139. `.emacs' file *before* the calendar or diary command.  This mode
  1140. interprets all dates in the diary in the European manner, and also uses
  1141. European style for displaying diary dates.  (Note that there is no
  1142. comma after the MONTHNAME in the European style.)
  1143.  
  1144.    To revert to the (default) American style of writing dates, type `M-x
  1145. american-calendar'.
  1146.  
  1147.    You can use the name of a day of the week as a generic date which
  1148. applies to any date falling on that day of the week.  You can abbreviate
  1149. the day of the week to three letters (with or without a period) or spell
  1150. it in full; it need not be capitalized.
  1151.  
  1152.    You can inhibit the marking of certain diary entries in the calendar
  1153. window; to do this, insert an ampersand (`&') at the beginning of the
  1154. entry, before the date.  This has no effect on display of the entry in
  1155. the diary window; it affects only marks on dates in the calendar
  1156. window.  Nonmarking entries are especially useful for generic entries
  1157. that would otherwise mark many different dates.
  1158.  
  1159.    Lines that do not begin with valid dates and do not continue a
  1160. preceding entry are ignored.
  1161.  
  1162.    If the first line of a diary entry consists only of the date or day
  1163. name with no following blanks or punctuation, then the diary window
  1164. display doesn't include that line; only the continuation lines appear.
  1165. For example:
  1166.  
  1167.      02/11/1989
  1168.            Bill B. visits Princeton today
  1169.            2pm Cognitive Studies Committee meeting
  1170.            2:30-5:30 Liz at Lawrenceville
  1171.            4:00pm Dentist appt
  1172.            7:30pm Dinner at George's
  1173.            8:00-10:00pm concert
  1174.  
  1175. appears in the diary window without the date line at the beginning.
  1176. This style of entry looks neater when you display just a single day's
  1177. entries, but can cause confusion if you ask for more than one day's
  1178. entries.
  1179.  
  1180.    You can edit the diary entries as they appear in the window, but it
  1181. is important to remember that the buffer displayed contains the *entire*
  1182. diary file, with portions of it concealed from view.  This means, for
  1183. instance, that the `C-f' (`forward-char') command can put point at what
  1184. appears to be the end of the line, but what is in reality the middle of
  1185. some concealed line.  *Be careful when editing the diary entries!*
  1186. Inserting additional lines or adding/deleting characters in the middle
  1187. of a visible line cannot cause problems.  Watch out for `C-e'
  1188. (`end-of-line'), however; it may put you at the end of a concealed line
  1189. far from where point appears to be!  Before editing the diary, it is
  1190. best to display the entire file with `s' (`show-all-diary-entries').
  1191.  
  1192.    While in the calendar, there are several commands to help you in
  1193. making entries to your diary.
  1194.  
  1195. `i d'
  1196.      Add a diary entry for the selected date (`insert-diary-entry').
  1197.  
  1198. `i w'
  1199.      Add a diary entry for the selected day of the week
  1200.      (`insert-weekly-diary-entry').
  1201.  
  1202. `i m'
  1203.      Add a diary entry for the selected day of the month
  1204.      (`insert-monthly-diary-entry').
  1205.  
  1206. `i y'
  1207.      Add a diary entry for the selected day of the year
  1208.      (`insert-yearly-diary-entry').
  1209.  
  1210.    You can make a diary entry for a specific date by moving point to
  1211. that date in the calendar window and using the `i d' command.  This
  1212. command displays the end of your diary file in another window and
  1213. inserts the date; you can then type the rest of the diary entry.
  1214.  
  1215.    If you want to make a diary entry that applies to a specific day of
  1216. the week, move point to that day of the week (any occurrence will do)
  1217. and use the `i w' command.  This displays the end of your diary file in
  1218. another window and inserts the day-of-week as a generic date; you can
  1219. then type the rest of the diary entry.
  1220.  
  1221.    You make a monthly diary entry in the same fashion.  Move point to
  1222. the day of the month, use the `i m' command, and type the diary entry.
  1223. Similarly, you make a yearly diary entry with the `i y' command.
  1224.  
  1225.    All of the above commands make marking diary entries.  If you want
  1226. the diary entry to be nonmarking, give a prefix argument to the
  1227. command.  For example, `C-u i w' makes a nonmarking, weekly diary entry.
  1228.  
  1229.    If you modify the diary, be sure to write the file before exiting
  1230. from the calendar.
  1231.  
  1232.